<?php

for ($i=1;$i<=6;$i++) {
	$header_file = "{$_SERVER["DOCUMENT_ROOT"]}/modules/course_boxes/templates/{$i}_header.dat";
	$brief_file = "{$_SERVER["DOCUMENT_ROOT"]}/modules/course_boxes/templates/{$i}_brief.dat";
	$content_file = "{$_SERVER["DOCUMENT_ROOT"]}/modules/course_boxes/templates/{$i}_content.dat";
	$url_file = "{$_SERVER["DOCUMENT_ROOT"]}/modules/course_boxes/templates/{$i}_url.dat";
	$color_file = "{$_SERVER["DOCUMENT_ROOT"]}/modules/course_boxes/templates/{$i}_color.dat";
	$font_color_file = "{$_SERVER["DOCUMENT_ROOT"]}/modules/course_boxes/templates/{$i}_font_color.dat";
        
        $brief = $_REQUEST["brief_{$i}"];
        $content = $_REQUEST["content_{$i}"];      
        
        file_put_contents($brief_file, $brief);
        file_put_contents($content_file, $content);
        
}
?>

Course boxes saved


